package com.hnluchuan.staff.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.hnluchuan.core.model.BaseModel;

import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;
import javax.persistence.FetchType;
import com.hnluchuan.staff.model.Employee;

/**
 * 紧急联系人
 */
@Entity
@Table(name = "emergency_contact") 
public class EmergencyContact extends BaseModel {
	private static final long serialVersionUID = 1L;
	
	public EmergencyContact() {
	}
	
	public EmergencyContact(Long id) {
		this.id = id;
	}
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
	private Long id;
	/**
	 * 员工ID
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "employee_id")
	private Employee employee;
	/**
	 * 姓名
	 */
	@Column(name = "name")    		
	private String contartName;
	/**
	 * 关系
	 */
	@Column(name = "relation")    		
	private String contartRelation;
	/**
	 * 联系电话
	 */
	@Column(name = "phone")    		
	private String contartPhone;
	/**
	 * 单位或住址
	 */
	@Column(name = "address")    		
	private String contartAddress;
	// fields end


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Employee getEmployee() {
		return employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public String getContartName() {
		return contartName;
	}

	public void setContartName(String contartName) {
		this.contartName = contartName;
	}

	public String getContartRelation() {
		return contartRelation;
	}

	public void setContartRelation(String contartRelation) {
		this.contartRelation = contartRelation;
	}

	public String getContartPhone() {
		return contartPhone;
	}

	public void setContartPhone(String contartPhone) {
		this.contartPhone = contartPhone;
	}

	public String getContartAddress() {
		return contartAddress;
	}

	public void setContartAddress(String contartAddress) {
		this.contartAddress = contartAddress;
	}
}
